Skip to content

Bump deps: pyo3 0.22→0.28, bincode 1→2, lru, uuid, assert_cmd - #184

Merged
zhangfengcdt merged 1 commit into
mainfrom
deps/combined-upgrade
May 23, 2026
Merged

Bump deps: pyo3 0.22→0.28, bincode 1→2, lru, uuid, assert_cmd#184
zhangfengcdt merged 1 commit into
mainfrom
deps/combined-upgrade

Conversation

@zhangfengcdt

Copy link
Copy Markdown
Owner

Summary

Combined dependency upgrade that supersedes the open Dependabot PRs:

What changed

pyo3 0.22 → 0.28

  • PyBytes::new_bound / PyDict::new_bound / PyList::new_bound / PyList::empty_bound → unsuffixed new / empty (the Bound variants became the default).
  • PyList::new is now fallible (returns PyResult), so call sites add ?.
  • py.allow_threads(..)py.detach(..) and Python::with_gil(..)Python::attach(..) (0.28 rename).
  • value.into_py(py)value.into_py_any(py).unwrap() via the new IntoPyObjectExt trait.
  • obj.downcast::<T>()obj.cast::<T>() on &Bound<PyAny>.
  • Five #[pyclass] types that derive Clone opt in to the legacy FromPyObject derive via from_py_object to silence the 0.28 deprecation warning.

bincode 1.3.3 → 2.0

Note: Dependabot's #173 proposed bincode 3.0.0, but that release is an xkcd-2347 placeholder crate (compile_error!("https://xkcd.com/2347/");) — not a real release. This PR targets bincode 2.0.1, the actual latest stable.

  • New crate::serde_bincode helper module wraps bincode::serde::encode_to_vec / decode_from_slice with bincode::config::legacy(), preserving byte-level wire compatibility with bincode 1.3. Existing git blobs, RocksDB rows, and proximity index snapshots written by older versions still round-trip.
  • bincode::Error is gone in 2.x. GitKvError::SerializationError splits into SerializationEncodeError(EncodeError) / SerializationDecodeError(DecodeError); StorageError::Serialization likewise splits into SerializationEncode / SerializationDecode.

lru 0.16 → 0.18, uuid 1.0 → 1.23, assert_cmd 2.0 → 2.2

Drop-in — no code changes needed.

Test plan

  • cargo build --all clean
  • cargo clippy --features "git sql" clean
  • cargo clippy --features "git sql rocksdb_storage proximity proximity_text" clean
  • cargo clippy --features "python proximity proximity_text rocksdb_storage" clean
  • cargo fmt --all -- --check clean
  • cargo test --features "git sql" — 225 tests pass, 0 failed
  • cargo test --features "git sql rocksdb_storage proximity proximity_text" — 363 tests pass, 0 failed
  • maturin build --release --features "python sql" produces a working wheel
  • Smoke-test wheel: ProllyTree.insert/find round-trip works
  • pytest python/tests/ (without rocksdb-gated tests) — 21 of 22 collected tests pass; the 1 setup error in test_sql.py is pre-existing (test creates a tempfile.mkdtemp() and calls ProllySQLStore(dir) without git init first — fails on main as well).

Combined dependency upgrade addressing #172, #173, #174, #175, #176.

pyo3 0.22 → 0.28:
- `PyBytes::new_bound` / `PyDict::new_bound` / `PyList::new_bound` /
  `PyList::empty_bound` → unsuffixed `new` / `empty` (Bound is now the
  default). `PyList::new` is now fallible (returns `PyResult`), so call
  sites add `?`.
- `py.allow_threads(..)` → `py.detach(..)` and `Python::with_gil(..)` →
  `Python::attach(..)` (0.28 rename).
- `value.into_py(py)` → `value.into_py_any(py).unwrap()` via the new
  `IntoPyObjectExt` trait.
- `obj.downcast::<T>()` → `obj.cast::<T>()` on `&Bound<PyAny>`.
- Five `#[pyclass]` types that derive `Clone` opt-in to the legacy
  `FromPyObject` derive via `from_py_object` to avoid the 0.28
  deprecation warning.

bincode 1.3 → 2.0:
- Dependabot proposed 3.0.0, which is an xkcd-2347 placeholder crate
  (`compile_error!`). Targeted 2.0 instead — the real latest stable.
- Added thin `crate::serde_bincode` module wrapping
  `bincode::serde::encode_to_vec` / `decode_from_slice` with
  `bincode::config::legacy()` so the on-disk format stays byte-compatible
  with what 1.3 produced (git blobs, RocksDB rows, and proximity index
  snapshots written by older versions still round-trip).
- `bincode::Error` is gone in 2.x. `GitKvError::SerializationError`
  splits into `SerializationEncodeError(EncodeError)` and
  `SerializationDecodeError(DecodeError)`; `StorageError::Serialization`
  likewise splits into `SerializationEncode` / `SerializationDecode`.

lru 0.16 → 0.18, uuid 1.0 → 1.23, assert_cmd 2.0 → 2.2: drop-in.

Verified: cargo build --all, cargo clippy with each feature flag set
(default / +rocksdb_storage +proximity +proximity_text / python /
python +proximity +proximity_text +rocksdb_storage), and the full
`git sql` and `git sql rocksdb_storage proximity proximity_text` test
suites all pass. maturin build with `python sql` produces a working
wheel that round-trips basic ops; 21 of the 22 collected pre-rocksdb
Python tests pass (the 1 setup error in test_sql is an unrelated
pre-existing missing `git init` in the temp dir).
@zhangfengcdt
zhangfengcdt merged commit 02e1cfa into main May 23, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant